1. Field of the Invention
The present invention relates generally to the scheduling of commands on a processor.
2. Background Art
Graphics processor units (GPU) are rapidly increasing in processing power. The increase in processing power is, at least in part, due to multiple independent processing units (e.g., SIMD processors, ALU) that are included in a GPU. In many graphics applications, the multiple independent processing units are utilized to perform parallel geometry computations, vertex calculations, and/or pixel operations. For example, graphics applications can often be characterized as single instruction multiple data (SIMD), where the same sequence of instructions can executed on multiple parallel data streams to yield substantial speedup of operations.
Another growing trend is the use of GPU for general purpose computations that may not necessarily be SIMD-type computations. The use of the GPU for general computations is referred to as GPGPU-style of computing. In the GPGPU-style of computing, the CPU can use the GPU for performing compute work items that were usually done in the CPU.
Conventionally, work for the GPU, for example, streams of vertices and texture information and instructions to process such information, are scheduled to operate on the GPU by the CPU. Software executing on the CPU may prioritize the various items of work (also referred to as “commands” below) according to some priority order, and enqueue them in a system memory buffer. The GPU asynchronously retrieves the work item to be processed next from the system memory buffers. On the GPU, the selection of the work item to be processed next is based on a priority ordering specified by the CPU. In some instances, the CPU may specify priority on a per work item basis, and in other instances the CPU may specify a priority associated with each memory buffer, and any work item enqueued in a memory buffer will have the priority associated with that buffer.
With the rapid increase of processing capability in the GPU, and also with the increasing use of GPU for general purpose computations, more effective means of more fully utilizing the available computing power of the GPU are needed. What are needed, therefore, are methods and systems that can more effectively allocate the GPU resources to work items.